package user;

import book.BookList;
import operation.IOperation;

import java.util.Scanner;

public abstract class User {
    // 用户输入
    Scanner scanner = new Scanner(System.in);
    // 用户名
    protected String name;
    // 用户权限
    protected IOperation[] operations;
    // 菜单方法
    public abstract int menu();
    // 根据用户输入操作书籍
    public void doOperation (int choice, BookList bookList) {
        operations[choice - 1].work(bookList);
    }
}
